package com.example.service.impl;

import com.example.domain.Student;
import com.example.service.ICache;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName CacheImpl
 * @Description TODO
 * @Author: XMK
 * @Date: 2020/12/23 18:31
 * @Version: 1.0
 */
@Service
@Transactional
public class CacheImpl implements ICache {
    @Override
    @Cacheable(cacheNames = "aaadfa")
    public Student test1(String p) {

        System.out.println("进入了test方法·····················");
        Student student = new Student();
        student.setName("aaa");
        student.setSex("男");

        return student;
    }
}
